#!/bin/bash
exec_name=EttaM1
autostart_dir=/etc/profile.d

[ ! -f ${autostart_dir}/${exec_name}-autostart.sh ] && exit
echo 123 | sudo -S rm -f ${autostart_dir}/${exec_name}-autostart.sh >/dev/null 2>&1

for i in "$@"; do
  if [ "${i}" == "reboot" ]; then
    option="reboot"
    break
  fi
done

case $option in
  "reboot")
    echo 123 | sudo -S systemctl restart gdm
    #reboot
    ;;

  *)
    ;;
esac